/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package spud;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Iterator;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author bsmith
 */
public class Spud {

    ArgHandler argHandler = null;
    FileHandler fileHandler = null;

    public Spud(String[] args) {
        try {
            run(args);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Spud.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void run(String[] args) throws FileNotFoundException {
        argHandler = new ArgHandler(args);
        fileHandler = new FileHandler(argHandler.getArgs().getDataDir());
                Set<String> symbols = fileHandler.getFilesSymbols();

        for(String symbol : symbols) {
            File file = fileHandler.getFile(symbol);
            
            CSVSpreadsheet csv = new CSVSpreadsheet(symbol, file);
        }
    }

    public static void main(String[] args) {
        new Spud(args);
    }
}
